const express =require('express')

const app = express()

//局部中间件  也可以多个局部中间件
const nn = (req,res,next)=>{
    console.log('局部路由');
    next()
}

const nnn = (req,res,next)=>{
    console.log('局部路由1');
    next()
}



//挂载具体路由
app.get('/user',nn,nnn,(req,res) =>{
    res.send('nmsl'+req.startTime)
})
app.post('/user',nnn,(req,res) =>{
    
    res.send('nmsl add' +req.startTime)
})

app.listen(80,()=>{
    console.log('server running at http://127.0.0.1');
})                          